﻿@using SCMS.Resource
@model SCMS.UI.Models.MBCategoryModel
@{AjaxOptions ajaxOpts = new AjaxOptions { UpdateTargetId = "budgetDiv", LoadingElementId = "loading", HttpMethod = "Post", Url = Url.Action("SaveCategory"),
    OnSuccess="HidePopupDiv"};}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Ajax.BeginForm(ajaxOpts))
{ 
    <table>
        <tbody>            
            <tr>
                <td align="right">@Resources.MasterBudget_CreateCategory_CategoryNumber<font color="red">*</font>:</td>
                <td>
                    @Html.EditorFor(model => model.Number)<br />
                    @Html.ValidationMessageFor(model => model.Number)
                </td>
            </tr>
            <tr>
                <td align="right">@Resources.Budget_CategoryList_CategoryName<font color="red">*</font>:</td>
                <td>
                    @Html.EditorFor(model => model.Description)<br />
                    @Html.ValidationMessageFor(model => model.Description)
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    @Html.HiddenFor(p => p.Id)
                    <input type="submit" value="@ViewBag.ButtonText" />&nbsp;
                    <input type="button" value="@Resources.Global_String_Cancel" onclick="javascript:CloseDialog()" />
                </td>
            </tr>
         </tbody>
    </table>
}  